/**
 * Created by James on 2016/02/21.
 */
//AngularJS 控制器
grApp.controller('GcoinCtrl',['$scope',
    '$http',
    'toaster',
    function($scope,$http,toaster){
        var loadingModal = angular.element("#icon-alert");
        loadingModal.modal();
    //页面初始化载入顺序事件
        $http.post('/user/center/getGcoin').success(function(data, status, headers, config)
        {
            loadingModal.modal('close');
            $scope.gcoins=data;
            //angular.forEach($scope.balances,function(data,index,array){
            //    $scope.balances[index].fileurl=JSON.parse(data.picurlarray)[0];
            //});
            //console.log(data);
        }).error(function(data, status, headers, config) {
        });

}]);